<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // 返回数组元素索引号方法   indexOf(数组元素) 作用就是返回该数组元素的索引号
        var arr = ['red','green','blue','pink','blue'];
        console.log(arr.indexOf('blue'));
    </script>
</head>

<body>

</body>

</html>